<table border='1' width="600px">
	<tr>
		<td align="center" colspan="7"><h2>Reservas</h2></td>
	</tr>
	<?php if($this->rowSet->count() == 0): ?>
		<tr>
			<td align="center"><h4>Nenhuma reserva cadastrada!</h4></td>
		</tr>
	<?php else: ?>	
		<?php echo $this->partial('partial.phtml', array('cabecalho' => array('Grupo','Código Reserva','Data Reserva','Código Filme','Código Cliente','Acões')))?>
			<?php foreach($this->rowSet as $row): ?>
				<tr bgcolor='<?php echo $this->cycle(array("#FFFFFF","#DDDDDD"))->next() ?>'>
					<td><?php echo $this->cycle(array('Grupo 1','Grupo 2','Grupo 3'),'Grupos')->next() ?></td>				
					<td><?php echo $row->id_reserva; ?></td>
					<td><?php echo $row->dt_reserva; ?></td>
					<td><?php echo $row->id_filme;   ?></td>
					<td><?php echo $row->id_cliente; ?></td>
					<td><a href='/public/reserva/excluir/id/<?php echo $row->id_reserva ?>'> Deletar </a></td>
					<td><a href='/public/reserva/formulario/id/<?php echo $row->id_reserva ?>'> Atualizar </a></td>						
				</tr>
			<?php endforeach; ?>
	<?php endif; ?>
		<tr>
			<td align="center" colspan="7"><button name="Inserir" type="button" onclick="window.location.href='http://locadora/public/reserva/formulario'">Inserir</button></td>
			<?php echo $this->dateFormat('2001-12-05');?>
		</tr>
</table>

